<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>JFaker</title>
    <#include "/WEB-INF/admin/app/common/_public.html" >
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
        <meta name="format-detection" content="telephone=no">
        <meta name="renderer" content="webkit">
        <meta http-equiv="Cache-Control" content="no-siteapp" />
        <link rel="alternate icon" type="image/png" href="${ctx}/resources/i/favicon.png">
        <link rel="stylesheet" href="${ctx}/resources/css/amazeui.min.css"/>
        <!--[if lt IE 9]>-->
        <script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
        <script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
        <script src="${ctx}/resources/js/amazeui.ie8polyfill.min.js"></script>
        <![endif]-->
        <!--[if (gte IE 9)|!(IE)]>&lt;!&ndash;>
    <script src="${ctx}/resources/js/jquery.min.js"></script>
    <!--&lt;!&ndash;<![endif]&ndash;&gt;-->
        <!--<script src="${ctx}/resources/js/amazeui.min.js"></script>-->
</head>


<body>


<header data-am-widget="header" class="am-header am-header-default">
    <div class="am-header-left am-header-nav">
        <a href="${ctx}/mobile/user/index" class="am-icon-reply"></a><a>审批意见</a>
        </a>
    </div>
    <!--<div class="am-header-right am-header-nav">-->
        <!--<a href="#" class="am-icon-check" >&nbsp&nbsp提交</a>-->
        <!--</a>-->
    <!--</div>-->
</header>

<form action="" class="am-form" data-am-validator>
    <fieldset>
        <div class="am-form-group">
            <label for="doc-vld-name-2">工作名称：</label>
            <input type="text" id="doc-vld-name-4 am-round" placeholder="请输入工作名称" required/>
        </div>

        <div class="am-form-group">
            <label for="doc-vld-name-2"  >工作性质：</label><br>
            <select data-am-selected>
                <option value="a">紧急任务</option>
                <option value="b">一般任务</option>
            </select>
        </div>

        <div class="am-form-group">
            <label for="doc-vld-name-2">协助者：</label>
            <input type="text" id="doc-vld-name-4" class="am-round" placeholder="请输入审批人" required/>
        </div>

        <div class="am-form-group">
            <label for="doc-vld-name-2">接受者：</label>
            <input type="text" id="doc-vld-name-5" class="am-round" placeholder="请输入审批人" required/>
        </div>

        <div class="am-form-group">
            <div class="am-alert am-alert-danger" id="my-alert" style="display: none">
                <p>开始日期应小于结束日期！</p>
            </div>
            <div class="am-g">
                <div class="am-u-sm-6">
                    <label for="doc-vld-name-2">开始时间：</label>
                    <input  type="text" id="my-start"   class="am-form-field am-round"  placeholder="开始时间" data-am-datepicker readonly></span>
                </div>

                <div class="am-u-sm-6">
                    <label for="doc-vld-name-2">结束时间：</label>
                    <input  type="text" class="am-form-field am-round"  id="my-end"  placeholder="结束时间" data-am-datepicker readonly></span>
                </div>
            </div>
        </div>

        <div class="am-form-group">
            <label for="doc-ta-1">工作描述：</label>
            <textarea class="" rows="1" id="doc-ta-1" ></textarea>
        </div>
        <div class="am-form-group">
            <label for="doc-vld-name-2">图片：</label>
            <input type="text" id="doc-vld-name-2"  required/>
        </div>

        <div class="am-form-group">
            <label for="doc-vld-name-2">审批人：</label>
            <input type="text" id="doc-vld-name-3" class="am-round" placeholder="请输入审批人" required/>
        </div>

        <div class="am-form-group">
            <label for="doc-ta-1">审批意见：</label>
            <textarea class="" rows="1" id="doc-ta-3" ></textarea>
        </div>
    </fieldset>



</form>

<div data-am-widget="navbar" class="am-navbar am-cf am-navbar-default "
     id="">
    <ul class="am-navbar-nav am-cf am-avg-sm-4">
        <li>
            <a href="">
                <span class="am-icon-check"></span>
                <span class="am-navbar-label">同意</span>
            </a>
        </li>
        <li data-am-navbar-share>
            <a href="###">
                <span class="am-icon-times"></span>
                <span class="am-navbar-label">不同意</span>
            </a>
        </li>


    </ul>
</div>
<script>
    $(function() {
        var startDate = new Date(2014, 11, 20);
        var endDate = new Date(2014, 11, 25);
        var $alert = $('#my-alert');
        $('#my-start').datepicker().
                on('changeDate.datepicker.amui', function(event) {
                    if (event.date.valueOf() > endDate.valueOf()) {
                        $alert.find('p').text('开始日期应小于结束日期！').end().show();
                    } else {
                        $alert.hide();
                        startDate = new Date(event.date);
                        $('#my-startDate').text($('#my-start').data('date'));
                    }
                    $(this).datepicker('close');
                });

        $('#my-end').datepicker().
                on('changeDate.datepicker.amui', function(event) {
                    if (event.date.valueOf() < startDate.valueOf()) {
                        $alert.find('p').text('结束日期应大于开始日期！').end().show();
                    } else {
                        $alert.hide();
                        endDate = new Date(event.date);
                        $('#my-endDate').text($('#my-end').data('date'));
                    }
                    $(this).datepicker('close');
                });
    });
</script>
<script src="${ctx}/resources/js/jquery.min.js"></script>
<script src="${ctx}/resources/js/amazeui.min.js"></script>

</body>
</html>